package cn.eeepay.framework.service.impl;

import cn.eeepay.framework.dao.AddressMappingDao;
import cn.eeepay.framework.db.pagination.Page;
import cn.eeepay.framework.model.AddressMapping;
import cn.eeepay.framework.model.UserLoginInfo;
import cn.eeepay.framework.service.AddressMappingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressMappingServiceImpl implements AddressMappingService {

    Logger logger = LoggerFactory.getLogger(AddressMappingServiceImpl.class);

    @Autowired
    private AddressMappingDao addressMappingDao;


    @Override
    public void insert(AddressMapping addressMapping) {
        addressMappingDao.insert(addressMapping);
    }

    @Override
    public List<AddressMapping> list(Integer jumpId, Page<AddressMapping> page) {
        return addressMappingDao.list(jumpId,page);
    }

    @Override
    public List<AddressMapping> list(Integer jumpId) {
        return addressMappingDao.selectByJumpId(jumpId);
    }

    @Override
    public void update(AddressMapping addressMapping) {
        addressMappingDao.update(addressMapping);
    }

//    @Override
//    public void delete(String address,Integer jumpId) {
//        addressMappingDao.delete(address,jumpId);
//    }

    @Override
    public void delete(Integer jumpId) {
        addressMappingDao.delete(jumpId);
    }
}
